#!/usr/bin/python
# coding:utf-8
# auther:DT
# 2017-08-09_03-39-22

import os
py_list = []
p_path = input("请输入你想遍历的路径（需要绝对路径）:")
end_name = input("请输入你想统计的文件后缀名(.py)：")
for i in os.listdir(p_path):
    if os.path.isdir(os.path.join(p_path,i)):
        if i.endswith(end_name):
            print(i)
        for n in os.listdir(os.path.join(p_path,i)):
            if os.path.isdir(os.path.join(p_path,i)):
                if n.endswith(end_name):
                    print(n)
